Skip to content

Respect user configuration#428

Merged
MaximilianSoerenPollak merged 5 commits intoeclipse-score:mainfrom
etas-contrib:respect-others
Mar 3, 2026
Merged

Respect user configuration#428
MaximilianSoerenPollak merged 5 commits intoeclipse-score:mainfrom
etas-contrib:respect-others

Conversation

@a-zw
Copy link
Contributor

@a-zw a-zw commented Feb 27, 2026

📌 Description

Don't blindly overwrite user configuration.
Instead set configuration only when not set before.

Fixes #416

🚨 Impact Analysis

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: d0bf0e2b-3fcb-4cd1-9ada-1e0ce0687e12
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: src
Loading: 0 packages loaded
    currently loading: src
Analyzing: target //src:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //src:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //src:license-check (66 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (68 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (76 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (128 packages loaded, 1631 targets configured)

Analyzing: target //src:license-check (129 packages loaded, 2510 targets configured)

Analyzing: target //src:license-check (140 packages loaded, 2576 targets configured)

Analyzing: target //src:license-check (140 packages loaded, 2576 targets configured)

Analyzing: target //src:license-check (140 packages loaded, 2576 targets configured)

INFO: Analyzed target //src:license-check (145 packages loaded, 4715 targets configured).
[10 / 16] Creating runfiles tree bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/score_tooling+/dash/tool/formatters/dash_format_converter.runfiles [for tool]; 0s local
[13 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //src:license.check.license_check up-to-date:
  bazel-bin/src/license.check.license_check
  bazel-bin/src/license.check.license_check.jar
INFO: Elapsed time: 22.330s, Critical Path: 2.52s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/src/license.check.license_check src/formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@a-zw a-zw force-pushed the respect-others branch from a7814d2 to 86b3bcf Compare March 2, 2026 08:24
@a-zw a-zw force-pushed the respect-others branch from 86b3bcf to d92cfb0 Compare March 2, 2026 08:25
Copy link
Contributor

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions that came to mind.
But overall looks like a good approach. 💯

@MaximilianSoerenPollak
Copy link
Contributor

Also error in the build documentation:

/home/runner/work/docs-as-code/docs-as-code/docs/concepts/bidirectional_traceability.rst:102: WARNING: plantuml command 'plantuml' cannot be run [plantuml]
/home/runner/work/docs-as-code/docs-as-code/docs/concepts/docs_deps.rst:41: WARNING: plantuml command 'plantuml' cannot be run [plantuml]

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Sphinx extension bundle to avoid overwriting user-provided conf.py settings, introducing a shared helper for “set default only if user didn’t set it” behavior.

Changes:

  • Add config_setdefault() helper (and unit tests) to only set Sphinx config values when they were not explicitly set by the user.
  • Update multiple extensions to use config_setdefault() and/or merge-with-precedence patterns instead of overwriting config values.
  • Adjust several config assignments to extend existing lists/dicts rather than replacing them.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/helper_lib/__init__.py Adds config_setdefault() helper based on Sphinx _raw_config.
src/helper_lib/test_helper_lib.py Adds unit tests validating config_setdefault() behavior.
src/extensions/score_sync_toml/__init__.py Uses config_setdefault() and merges list-like config values instead of overwriting.
src/extensions/score_sphinx_bundle/__init__.py Uses config_setdefault() and mutates existing config structures rather than replacing them.
src/extensions/score_plantuml.py Avoids overwriting PlantUML-related config values; attempts to respect user config.
src/extensions/score_metamodel/__init__.py Switches from overwriting sphinx-needs config lists to extending them; uses config_setdefault() for some flags.
src/extensions/score_layout/__init__.py Merges layout/theme-related dict configs so user entries take precedence.
src/extensions/score_draw_uml_funcs/__init__.py Populates needs_render_context via setdefault to avoid overriding user keys.
src/extensions/score_source_code_linker/__init__.py Uses setdefault to avoid overwriting needs_string_links entries.

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

The created documentation from the pull request is available at: docu-html

Copy link
Contributor

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the work.

@MaximilianSoerenPollak MaximilianSoerenPollak merged commit b2e62cd into eclipse-score:main Mar 3, 2026
13 checks passed
@a-zw a-zw deleted the respect-others branch March 3, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Respect user configuration and don't overwrite

3 participants